package top.wutunan.springboothelloworlddemo.web.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {


    /**
     * get请求
     * @return
     */
    @GetMapping("/get")
    public String testGet() {
        log.info("get请求: 192.168.5.102");
        return "get hello world 192.168.5.102";
    }


    /**
     * post请求
     * @return
     */
    @PostMapping("/post")
    public String testPost() {
        log.info("post请求: 192.168.5.102");
        return "post hello world 192.168.5.102";
    }



}
